package chapter1;

public class ExampleB
{
    public static void main(String[] args)
    {
        int sum = 0;
        for (int i=0;i<100;i++)
            sum = sum + i;
        System.out.println(sum);

        sum = 0;
        for (int i=0;i<100;i++)
            sum = sum + i;
        System.out.println(sum);

        sum = 0;
        int i = 0;
        while(i<100)
            sum = sum + i++;
        System.out.println(sum);

        sum = i = 0;
        do
            sum = sum + i++;
        while(i<100);
        System.out.println(sum);
    }
}
